﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZhiHeng.OneCard.CommUtility
{
    public struct TranData
    {
        /// <summary>
        /// 姓名四个汉字
        /// </summary>
        public string Name;

        /// <summary>
        /// 性别
        /// </summary>
        public byte SexNo; 							//性别

        /// <summary>
        /// 部门代码
        /// </summary>
        public string DeptCode;						//部门代码

        /// <summary>
        /// 卡号
        /// </summary>
        public uint CardNo; 						//卡号

        /// <summary>
        /// 账号
        /// </summary>
        public uint AccountNo; 						//账号

        /// <summary>
        /// 主转账卡账号
        /// </summary>
        public uint TransferAcc; 					//主转账卡账号
        
        /// <summary>
        /// 人员编号
        /// </summary>
        public string StudentCode; 					//人员编号

        /// <summary>
        /// 身份证号
        /// </summary>
        public string IDCard; 						//身份证号

        /// <summary>
        /// 身份代码
        /// </summary>
        public string PID;							//身份代码

        /// <summary>
        /// 身份序号
        /// </summary>
        public string IDNo; 							//身份序号

        /// <summary>
        /// 现余额
        /// </summary>
        public int Balance; 						//现余额

        /// <summary>
        /// 消费密码
        /// </summary>
        public string Password;						//消费密码

        /// <summary>
        /// 账户截止日期
        /// </summary>
        public DateTime ExpireDate;						//账户截止日期

        /// <summary>
        /// 补助戳
        /// </summary>
        public ushort SubSeq;							//补助戳
        /// <summary>
        /// 是否在本系统内开通
        /// </summary>
        public byte IsOpenInSys;					//是否在本系统内开通

        /// <summary>
        /// 终端号码
        /// </summary>
        public ushort TerminalNo;						//终端号码

        public string     Flag;           //状态

        public byte  CardType;        /*卡类型*/

        public string AccType;         /*电子账户类型，如果输入则会查询相应的电子帐户余额*/

        public ushort  UsedCardNum;        /*卡片上的用卡次数*/

        public int  AccAmt;             /*精确查询时根据输入的AccType查询到的电子帐户余额*/

        /// <summary>
        /// 后台处理返回
        /// </summary>
        public short RetCode;						//后台处理返回		

        public string Operator;		/*操作员*/

        /// <summary>
        /// 交易流水号
        /// </summary>
        public uint TranJnl;			/*交易流水号*/

        /// <summary>
        /// 后台交易流水号
        /// </summary>
        public uint BackJnl;			/*后台交易流水号*/
        public string Phone;
        public string GuiId;
        /// <summary>
        /// 发卡版本号
        /// </summary>
        public ushort CardVersion;
        /// <summary>
        /// 卡押金
        /// </summary>
        public short DepositAmt;
        /// <summary>
        /// 租赁押金
        /// </summary>
        public short RentDepositAmt;
        /// <summary>
        /// 发卡日期
        /// </summary>
        public DateTime OpenDate;
        /// <summary>
        /// 换卡/补卡手续费、发卡柜子租金
        /// </summary>
        public short FeeAmt;
        /// <summary>
        /// 现金标志,0-非现金 1-现金
        /// </summary>
        public int CashFlag;
    }

    public struct CardConsume
    {
        /// <summary>
        /// 帐号
        /// </summary>
        public uint AccountNo;			/*帐号*/

        /// <summary>
        /// 卡号
        /// </summary>
        public uint CardNo;				/*卡号*/

        /// <summary>
        /// 消费类型
        /// </summary>
        public string ConsumeType;	/*消费类型*/

        /// <summary>
        /// 卡余额，精确到分
        /// </summary>
        public int CardBalance; 		/*卡余额,精确至分*/

        /// <summary>
        /// 交易额,精确至分
        /// </summary>
        public int TranAmt; 			/*交易额,精确至分*/

        /// <summary>
        /// 用卡次数，交易前
        /// </summary>
        public ushort UseCardNum;			/*用卡次数，交易前*/

        /// <summary>
        /// 终端编号
        /// </summary>
        public ushort TerminalNo;			/*终端编号*/
       
        public string PassWord;		/*卡密码*/

        
        public string Operator;		/*操作员*/

        /// <summary>
        /// 摘要
        /// </summary>
        
        public string Abstract;		/*摘要*/

        /// <summary>
        /// 交易流水号
        /// </summary>
        public uint TranJnl;			/*交易流水号*/

        /// <summary>
        /// 后台交易流水号
        /// </summary>
        public uint BackJnl;			/*后台交易流水号*/

        /// <summary>
        /// 后台处理返回值
        /// </summary>
        public short RetCode;			/*后台处理返回值*/
        /// <summary>
        /// 商户账号
        /// </summary>
        public int MercAcc;
        /// <summary>
        /// 现金标志 1现金，0非现金
        /// </summary>
        public int CashFlag;
        /// <summary>
        /// 押金
        /// </summary>
        public int DepositAmt;
    }

    public struct CardAction
    {
        /// <summary>
        /// 帐号
        /// </summary>
        public uint AccountNo;
        /// <summary>
        /// 卡号
        /// </summary>
        public uint CardNo;	
        /// <summary>
        /// 学号
        /// </summary>
        public string Sno;

        /// <summary>
        /// 查询密码
        /// </summary>
        public string QueryPWD;

        /// <summary>
        /// 操作员
        /// </summary>
        public string Operator;

        /// <summary>
        /// 后台处理返回值
        /// </summary>
        public short RetCode;

        /// <summary>
        /// 交易流水号
        /// </summary>
        public uint TranJnl;			/*交易流水号*/

        /// <summary>
        /// 后台交易流水号
        /// </summary>
        public uint BackJnl;			/*后台交易流水号*/

    }

    public struct MercQSAction
    {
        /// <summary>
        /// 商户账号
        /// </summary>
        public uint MercAcc;
        /// <summary>
        /// 结算开始日期，格式yyyyMMdd
        /// </summary>
        public String StartDate;
        /// <summary>
        /// 结算结束日期,格式yyyyMMdd
        /// </summary>
        public string EndDate;
        /// <summary>
        /// 操作员
        /// </summary>
        public string Operator;
        /// <summary>
        /// 后台处理返回值
        /// </summary>
        public short RetCode;
        /// <summary>
        /// 交易流水号
        /// </summary>
        public uint TranJnl;			/*交易流水号*/
        /// <summary>
        /// 后台交易流水号
        /// </summary>
        public uint BackJnl;			/*后台交易流水号*/

    }

    public struct SystemTranAction
    {
        /// <summary>
        /// 交易额
        /// </summary>
        public int TranAmt;
        /// <summary>
        /// 借方科目或商户
        /// </summary>
        public String FromSide;
        /// <summary>
        /// 贷方科目或商户
        /// </summary>
        public string ToSide;
        /// <summary>
        /// 操作员
        /// </summary>
        public string Operator;
        /// <summary>
        /// 后台处理返回值
        /// </summary>
        public short RetCode;
        /// <summary>
        /// 交易流水号
        /// </summary>
        public uint TranJnl;			/*交易流水号*/
        /// <summary>
        /// 后台交易流水号
        /// </summary>
        public uint BackJnl;			/*后台交易流水号*/

    }
}
